package cn.itrip.service.itripHotelOrder;
import cn.itrip.beans.pojo.ItripHotelOrder;

import java.math.BigDecimal;
import java.security.PublicKey;
import java.util.List;
import java.util.Map;
import java.util.List;
import java.util.Map;

import cn.itrip.beans.pojo.ItripHotelTempStore;
import cn.itrip.beans.pojo.ItripUserLinkUser;
import cn.itrip.common.BigDecimalUtil;
import cn.itrip.common.Page;
import com.sun.javafx.logging.PulseLogger;
import com.sun.org.apache.xpath.internal.operations.Bool;

/**
* Created by shang-pc on 2015/11/7.
*/
public interface ItripHotelOrderService {

    public ItripHotelOrder getItripHotelOrderById(Long id)throws Exception;

    public List<ItripHotelOrder>	getItripHotelOrderListByMap(Map<String, Object> param)throws Exception;

    public Integer getItripHotelOrderCountByMap(Map<String, Object> param)throws Exception;

    /**
     * 添加(修改)订单方法
     * @param itripHotelOrder
     * @return 订单编号 和 订单id
     * @throws Exception
     */
    public Map<String,Object> itriptxAddItripHotelOrder(ItripHotelOrder itripHotelOrder,
                                                        List<ItripUserLinkUser> linkUsers)throws Exception;

    public Integer itriptxModifyItripHotelOrder(ItripHotelOrder itripHotelOrder)throws Exception;

    public Integer itriptxDeleteItripHotelOrderById(Long id)throws Exception;

    public Page<ItripHotelOrder> queryItripHotelOrderPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize)throws Exception;

    /**
     * 查看实时房间库存
     * @param params
     * @return
     * @throws Exception
     */
    public List<ItripHotelTempStore> queryRoomStore(Map<String,Object> params)throws Exception;

    public Boolean validateRoomStore(Map<String,Object> params)throws Exception;

    public Map<String,Object> validateRoomStore2(Map<String,Object> params)throws Exception;

    /**
     * 计算订单金额
     * @param count
     * @param roomId
     * @return
     * @throws Exception
     */
    public BigDecimal getOrderPayAmount(int count, long roomId)throws Exception;
}
